import com.lyc.Pojo.Hello;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyTeat {
    public static void main(String[] args) {
        //获取Spring的上下文对象
            ApplicationContext  context = new ClassPathXmlApplicationContext("bean.xml");
        //我们的对象是在spring中管理的，所以从Spring中获取
        Hello hello =  context.getBean("hello", Hello.class);
        System.out.println(hello.getName());
    }
}
